Add #EuroPython #Python hashtags to bingo share#1699
Conversation
Preview available
|
| } | ||
|
|
||
| const BINGO_PAGE_URL = 'https://ep2026.europython.eu/#bingo'; | ||
| const BINGO_PAGE_URL = 'https://ep2026.europython.eu/bingo'; |
There was a problem hiding this comment.
This was suggested to me before, but other sections have URLS like https://ep2026.europython.eu/#krakow - don't we want to be consistent? And does the hash even matter?
There was a problem hiding this comment.
I don't think we need them, they look a bit weird, and when I click around the site, I don't see any hashes like this in URLs (not counting mid-page anchors)
|
@hugovk I don't really know why, but this change breaks LinkedIn sharing by removing the URL, by clipping everything after the last question including the URL: |
Co-authored-by: Daria Grudzien <hello@dariagrudzien.com>
Hmm, this is what Claude suggests:
diff --git a/src/components/island/BingoCard.svelte b/src/components/island/BingoCard.svelte
index 085796e6..1688e91c 100644
--- a/src/components/island/BingoCard.svelte
+++ b/src/components/island/BingoCard.svelte
@@ -48,18 +48,20 @@
} catch {}
}
- function buildShareText() {
+ function buildShareText(forLinkedIn = false) {
const attended = editions.filter((_, i) => checked[i]).map(e => `${e.year} ${e.city}`);
const count = attended.length;
const base = `I've attended ${count} EuroPython conference${count !== 1 ? 's' : ''}! 🐍`;
const body = count > 0 ? `${base}\n\n${attended.join(' · ')}` : base;
- return `${body}\n\nWhat about you? ${BINGO_PAGE_URL}\n\n#EuroPython #Python`;
+ // LinkedIn drops everything after a "?" in the prefilled text, even when encoded
+ const prompt = forLinkedIn ? 'What about you:' : 'What about you?';
+ return `${body}\n\n${prompt} ${BINGO_PAGE_URL}\n\n#EuroPython #Python`;
}
const BINGO_PAGE_URL = 'https://ep2026.europython.eu/bingo';
function shareLinkedIn() {
- const text = buildShareText();
+ const text = buildShareText(true);
window.open(
`https://www.linkedin.com/feed/?shareActive=true&text=${encodeURIComponent(text)}`,
'_blank', 'noopener,noreferrer'
But we can just change "What about you?" back to "What about you:" for a quick fix. |
Sure, that makes sense. Let's make sure to keep 2 newlines before the hashtags, so the url pops out. I'm heading for the EP and some family time before that, will be mostly offline from now on. |
Done, back to colon, and with 2 newlines before the hashtags.
Have a good break before EP! Perhaps someone else can approve/merge. |
hypha
left a comment
There was a problem hiding this comment.
Tested on LinkedIn and looks good now.
We should check our main page OpenGraph details to be sure that there is no issue when we share it on socials. |
|
Not related to this PR. |
Dismissing to see if this let's me merge...




Also list social networks in same order as homepage: